package com.quanyue.haircut.shop.mapper;

import com.quanyue.haircut.domain.entity.TechnicianAssess;
import com.quanyue.haircut.shop.dto.AssessDetail;
import com.vhuomai.mybatis.mapper.auto.AutoMapper;
import com.vhuomai.mybatis.mapper.page.Page;
import com.vhuomai.mybatis.mapper.page.PageRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AssessMapper extends AutoMapper <TechnicianAssess, Integer> {
    @Select("select a.id, a.star_count, a.content, a.create_time, u.nick_name, u.head_image "
            + "from qy_technician_assess a "
            + "left join qy_user u on a.user_id = u.id "
            + "where a.technician_id = #{technicianId} ")
    Page <AssessDetail> findAssessDetail(@Param("request") PageRequest request, @Param("technicianId") Integer technicianId);

}
